# -*- coding:utf-8 -*-
"""
@author: fsksf

@since: 2022/3/17 17:02
"""


class MarketManager:

    def __init__(self, broker):
        self.broker: "BacktestGateway" = broker
        self.engine: "MainEngine" = broker.engine

    def feed_tick(self):
        pass

    def feed_bar(self):
        for bar in self.engine.guard_left.get_history_bar(contract_ids=contract_ids,
                                                          start_dt=start_dt,
                                                          end_dt=end_dt,
                                                          count=count_sorted[-1][1],
                                                          freq=count_sorted[-1][0]
                                                          ):
            self.engine.guard_left.put_bar(bar)


if __name__ == '__main__':
    from .gateway import BacktestGateway
    from vcat.core.engine import MainEngine
